package adapter

import (
	"ex/interfaces"
)

type A struct {
	b interfaces.AgWebrtc // 通过接口引用 pkgB
}

func NewA(b interfaces.AgWebrtc) *A {
	return &A{b: b}
}

func (a *A) ForwardWebRTCRequest(channelId string, msg string) {
	// 调用 pkgB 的功能
	print(channelId, msg)
}

func (a *A) onMsg() {
	a.b.SendString("1", "nihao")
}
